namespace RAG.Domain.Repositories;

/// <summary>
/// 通用仓储接口
/// </summary>
/// <typeparam name="T">实体类型</typeparam>
public interface IRepository<T> where T : class
{
    //根据ID查询
    Task<T?> GetByIdAsync(Guid Id);
    //查询所有
    Task<IEnumerable<T>> GetAllAsync();
    //创建
    Task<T> CreatedAsync(T entity);
    //更新
    Task<T> UpdateAsync(T entity);
    //删除
    Task DeleteAsync(Guid Id);
}

